package model;

/**
 * This class creates a price to be used for the invoices. 
 *  
 * @author Joshua Harris
 * @version 1.0
 */
public class Price {
	
	private final int dollars, cents;
	
	/**
	 * This constructor sets the parameters to the variables in this class. 
	 * 
	 * @param dollars This is taken in as an int and set to the dollars of this class. 
	 * @param cents This is taken in as an int and set to the cents in this class. 
	 */
	public Price(int dollars, int cents){
		this.dollars = dollars;
		this.cents = cents;
	}
	
	/**
	 * This getter gets the dollars and returns it as an int. 
	 * @return Returns the dollar amount as an int. 
	 */
	public int getDollars(){
		return dollars;
	}
	
	/**
	 * This getter gets the cent amount and returns it as an int. 
	 * @return Returns the cent amount as an int. 
	 */
	public int getCents(){
		return cents;
	}
	
	/**
	 * ex: "$4.50"
	 * 
	 * @return the price.
	 */
	public String toString(){
		return "$" + dollars + "." + cents;
	}
	
}